/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import React, { useState } from 'react';
import { PageContainer } from '@ant-design/pro-layout';
import LoginPage from '@/components/_pages/quickLogin/loginPage';
import { Tabs } from 'antd';
import { tabList } from '@/components/_pages/quickLogin/loginPage/_utils';

const QuickLogin: React.FC = () => {
  const [activeKey, setActiveKey] = useState<string>('city');

  const handleTabChange = (current: string) => {
    setActiveKey(current);
  };

  return (
    <PageContainer>
      <Tabs onChange={handleTabChange}>
        {tabList.map((item) => (
          <Tabs.TabPane tab={item.tab} key={item.key}>
            <LoginPage name={item.tab} type={item.key} activeKey={activeKey} />
          </Tabs.TabPane>
        ))}
      </Tabs>
    </PageContainer>
  );
};

export default QuickLogin;
